package dao

import (
	"time"
)

// 这是 SysApi 的全局公开dao对象
var SysApiDao = sysApiDao{}

// 这是 sys_api表 的实体类
type SysApi struct {
	Id          int       `json:"id" form:"id" binding:"id"`
	CreatedAt   time.Time `json:"created_at" form:"created_at" binding:"created_at"`
	UpdatedAt   time.Time `json:"updated_at" form:"updated_at" binding:"updated_at"`
	DeletedAt   time.Time `json:"deleted_at" form:"deleted_at" binding:"deleted_at"`
	Path        string    `json:"path" form:"path" binding:"path"`                      // api路径
	Description string    `json:"description" form:"description" binding:"description"` // api中文描述
	ApiGroup    string    `json:"api_group" form:"api_group" binding:"api_group"`       // api组
	Method      string    `json:"method" form:"method" binding:"method"`                // 方法

}

// 注意:这是 SysApi 的私有dao对象
type sysApiDao struct {
	Obj    SysApi
	Insert func(arg SysApi) int    //插入一条记录
	Update func(arg SysApi) int    //更新一条记录
	Delete func(arg SysApi) int    //删除一条记录
	Select func(arg SysApi) SysApi //获取一条记录
}
